<script setup lang="ts">
// 导出指定模块
import useStore from '@/store'
import { onMounted } from 'vue'
import { userRequest } from '@/apis/api/user'
const { userInfo } = useStore()
// 获取
userInfo.getUserList()

onMounted(() => {
  
  userRequest({}).then((res: any) => {
    console.log('res: ', res);
    
  })
})

</script>

<template>
  <div>
    <el-button type="primary">按钮</el-button>
    <ul>
      <li v-for="item in userInfo.userList" :key="item.username">姓名：{{ item.username }}</li>
    </ul>
  </div>
</template>

<style lang="scss" scoped></style>
